<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label"><span style="color:red">*</span>问卷标题</label>
    <div class="col-lg-6">
        <input class="form-control valid" name="title" title="请输入问卷标题" value="{$questionnaire['title']}"
               placeholder="请输入问卷标题">
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label"><span style="color:red">*</span>开始时间</label>
    <div class="col-lg-6">
        <input class="form-control date-picker valid" title="请输入开始时间" id="start" name="startdate"
               value="{$questionnaire['startdate']}" placeholder="请输入开始时间" readonly>
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label"><span style="color:red">*</span>结束时间</label>
    <div class="col-lg-6">
        <input class="form-control date-picker valid" title="请输入结束时间" id="end" name="enddate"
               value="{$questionnaire['enddate']}" placeholder="请输入结束时间" readonly>
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label">规则说明</label>
    <div class="col-lg-6">
        <div id="editor-container" class="container">
            <textarea name="rules" id="rules">
                {$questionnaire['rules']}
            </textarea>
        </div>
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label">背景图片</label>
    <div class="col-lg-6">
        <input type="hidden" name="background_image" value="{$questionnaire['background_image']}">
        <input type="file" class="activity-image"
               onchange="uploadImage(this, ['png','jpg','jpeg','bmp','gif'], [750, 1260], 500, true, true);"
               accept="image/gif,image/jpeg,image/jpg,image/png">
        <empty name="questionnaire.background_image">
            <img src="/Public/images/questionnaire/background.jpg" class="thumbnail" width="100px" height="100px">
            <else/>
            <img src="{$questionnaire['background_image']}" class="thumbnail" width="100px" height="100px">
        </empty>
        <p class="help-block">有默认的背景图片，可自定义替换，图片为750px*1260px的png、jpg、jpeg、bmp、gif格式图片，大小不超过500k</p>
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label">启动按钮</label>
    <div class="col-lg-6">
        <input type="hidden" name="button_image" value="{$questionnaire['button_image']}">
        <input type="file" class="activity-image" onchange="uploadImage(this, ['png'], [540, 188], 200, true, true);"
               accept="image/gif,image/jpeg,image/jpg,image/png">
        <empty name="questionnaire.button_image">
            <img src="/Public/images/questionnaire/theme1_go.png" class="thumbnail" width="100px" height="100px">
            <else/>
            <img src="{$questionnaire['button_image']}" class="thumbnail" width="100px" height="100px">
        </empty>
        <p class="help-block">有默认的按钮图片，可自定义替换，图片为540px*188px的png格式图片，大小不超过200k</p>
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label">卡片背景</label>
    <div class="col-lg-6">
        <input type="hidden" id="title_image" name="title_image" value="{$questionnaire['title_image']}">
        <input type="file" class="activity-image"
               onchange="uploadImage(this, ['png','jpg','jpeg','bmp','gif'], [680, 960], 500, false, true);"
               accept="image/gif,image/jpeg,image/jpg,image/png">
        <empty name="questionnaire.title_image">
            <img src="/Public/images/questionnaire/title_image.jpg" class="thumbnail" width="100px" height="100px">
            <else/>
            <img src="{$questionnaire['title_image']}" class="thumbnail" width="100px" height="100px">
        </empty>
        <p class="help-block">图片为680px*960px的png、jpg、jpeg、bmp、gif格式的格式图片，大小不超过500k</p>
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label">主题色</label>
    <div class="col-lg-6">
        <empty name="questionnaire.theme_color">
            <input type="hidden" name="theme_color" value="1">
            <else/>
            <input type="hidden" name="theme_color" value="{$questionnaire['theme_color']}">
        </empty>
        <div class="style">
            <div class="style-box <if condition='$questionnaire.theme_color eq 1 || $questionnaire.theme_color eq null'>box-border</if>">
                <img alt="" src="/Public/images/questionnaire/Rectangle1.png">
            </div>
            <div class="style-box <if condition='$questionnaire.theme_color eq 2'>box-border</if>">
                <img alt="" src="/Public/images/questionnaire/Rectangle2.png">
            </div>
            <div class="style-box <if condition='$questionnaire.theme_color eq 3'>box-border</if>">
                <img alt="" src="/Public/images/questionnaire/Rectangle3.png">
            </div>
            <div class="style-box <if condition='$questionnaire.theme_color eq 4'>box-border</if>">
                <img alt="" src="/Public/images/questionnaire/Rectangle4.png">
            </div>
        </div>
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label">是否获取微信信息</label>
    <div class="col-lg-6">
        <input type="radio" name="need_register" value="0" <?php
        if(empty($questionnaire) || empty($questionnaire['need_register'])){
            echo " checked ";
        }
        ?>>否
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="radio" name="need_register" value="1" <?php
        if(!empty($questionnaire) && !empty($questionnaire['need_register'])){
            echo " checked ";
        }
        ?>>是
    </div>
</div>
<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label">每日参与次数限制</label>
    <div class="col-lg-6">
        <input class="form-control" type="text" name="reserve" value="<?php
            if(!empty($questionnaire) && !empty($questionnaire['reserve'])){
            echo $questionnaire['reserve'];
        }else{
            echo 0;
        }
        ?>">
    </div>
</div>